import request from '@/utils/request';


//查询公司列表
export const queryCompanyList = () => {
    return request({
        url: '/eduM2/company/getAllCompany',
        method: 'post',
    })
}


//新增公司
export const addCompany = (row) => {
    return request({
        url: '/eduM2/company/addCompany/' + row.pwd,
        method: 'post',
        data: row
    })
}

//修改公司
export const updateCompany = (row) => {
    return request({
        url: '/eduM2/company/updateCompany',
        method: 'get',
        params: {
            companyId: row.id,
            companyName: row.companyName,
            analysis: row.analysis
        }
    })
}

// 删除公司
export const deleteCompany = (companyId) => {
    return request({
        url: '/eduM2/company/deleteCompanyById/' + companyId,
        method: 'get',
    })
}

//修改公司管理员密码
export const updateCompanyPwd = (row,token) => {
    return request({
        url: '/admin/acl/user/updatePwd/' + row.companyId + '/' + row.newPwd,
        method: 'get',
        headers: {
            token
        },
    })
}